using Godot;
using System;

public partial class UiTips : Ui
{
	private AnimationPlayer _animationPlayer;
	private Label _label;
	// Called when the node enters the scene tree for the first time.
	public override void _Ready()
	{
		_animationPlayer = this.GetNode<AnimationPlayer>("AnimationPlayer");
		_label = this.GetNode<Label>("Tips");
		_animationPlayer.AnimationStarted += (a) => this.Visible = true;
		_animationPlayer.AnimationFinished += (a)=> this.Visible = false;
	}

	// Called every frame. 'delta' is the elapsed time since the previous frame.
	public override void _Process(double delta)
	{
	}
    public override void enter()
    {
    }
    public override void exit()
    {
    }
	public void ShowTips(string tips)
	{
		_label.Text = tips;
		_animationPlayer.Play("tips");
	}
}
